package com.donzell.web.controller.admin;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.donzell.dao.RoleDao;
import com.donzell.model.EcsRole;
import com.donzell.web.controller.comm.Result;

@Controller
@RequestMapping("/admin/role")
public class AdminRoleController {

	@Autowired
	private RoleDao roleDao;
	
	@ResponseBody
	@RequestMapping("/rolelist")
	public Result getRoleList(HttpServletRequest request){
		List<EcsRole> adminRoleList = roleDao.findAll();
		return Result.getSuccResult(adminRoleList);
	}
	
}
